from wfs import views
from django.conf.urls import include,url,patterns
from django.contrib import admin
from django.views.static import serve
from django.conf import settings
from rest_framework.urlpatterns import format_suffix_patterns
from django.views.decorators.csrf import csrf_exempt
urlpatterns = [
    url(r'^workflow_role$',csrf_exempt(views.RoleView.as_view()),name='role-list'),
    url(r'^workflow_role/(?P<pk>[0-9]+)$',csrf_exempt(views.RoleDetailView.as_view()),name='role-detail'),
    url(r'^workflow_role_user$',csrf_exempt(views.RoleUserView.as_view()),name='user-list'),
    url(r'^workflow_role_user/(?P<pk>[0-9]+)$',csrf_exempt(views.RoleUserDetailView.as_view()),name='urer-detail'),
    url(r'^workflow_agent$',csrf_exempt(views.agent),name='agent-list'),
    url(r'^workflow_agent/(?P<pk>[0-9]+)$',csrf_exempt(views.agent_one),name='agent-list'),
    #url(r'^workflow_agent/(?P<pk>[0-9]+)/$',csrf_exempt(views.AgentDetailView.as_view(),name='agent-detail'),
    url(r'^workflow_name$',csrf_exempt(views.worflow_name),name='workflow'),
    url(r'^workflow/$',csrf_exempt(views.workflow),name='workflow'),
    url(r'^workflow/(?P<pk>[0-9]+)$',csrf_exempt(views.workflow_one),name='workflow'),
    url(r'^workflow_case$',csrf_exempt(views.case_workflow),name='workflow_case'),
    url(r'^case_user_org$',csrf_exempt(views.workflow_case_one),name='workflow_case'),
    url(r'^workflow_approval$',csrf_exempt(views.workflow_approval),name='workflow_approval'),
    url(r'^workflow_bacth_approval$',csrf_exempt(views.bacth_app),name='bacth'),
    url(r'^workflow_approval/(?P<pk>[0-9]+)$',csrf_exempt(views.workflow_approval_one),name='workflow_approval'),
    url(r'^workflow_reminder$',csrf_exempt(views.reminder),name='workflow_approval'),
    url(r'^workflow_agent_config$',csrf_exempt(views.agent_config),name='workflow_agent_config'),
    url(r'^workflow_agent_config/(?P<pk>[0-9]+)$',csrf_exempt(views.agent_config_one),name='workflow_agent_config'),
    url(r'^workflow_approval_record$',csrf_exempt(views.approval_record),name='workflow_agent_config'),
    url(r'^user_org$',csrf_exempt(views.user_org),name='workflow_agent_config'),
    url(r'^from_approval/(?P<pk>[0-9]+)$',csrf_exempt(views.from_approver),name='from_approver'),
    url(r'^from_approval$',csrf_exempt(views.approver_from),name='from_approver'),
    url(r'^from_approval2$',csrf_exempt(views.approver_from2),name='from_approver'),
    url(r'^from_type$',csrf_exempt(views.from_type),name='from_type'),
    url(r'^from_node$',csrf_exempt(views.from_node),name='from_node'),
    url(r'^from_month$',csrf_exempt(views.from_month),name='from_month'),
    url(r'^mqtts$',views.mqtt,name='up'),
    url(r'^mqtts/(?P<pk>[0-9]+)$',views.mqtt2,name='up'),
    url(r'^download/(?P<path>.*)$',serve, {'document_root':settings.STATIC_PATH},name='upload'),

]